package net.jueb.frameWorkDemo.mvc4mod.bean;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * <b>
 * @Component 注解说明这是一个普通的bean，
 * 在Component Scanning时会被扫描到并被注入到Bean容器中；我们可以在其它引用此类的地方进行自动装配。
 * </b>
 * @author jaci
 */
@Component
@PropertySource(value = {"classpath:common.properties", "classpath:abc.properties"})
public class Config {

    @Value("${connect.api.apiKeyId}")
    public String apiKeyId;

    @Value("${connect.api.secretApiKey}")
    public String secretApiKey;

    public String getApiKeyId() {
        return apiKeyId;
    }

    public String getSecretApiKey() {
        return secretApiKey;
    }
}

